package com.lantosec.hmrp.modules.archives.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserHouseVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 领导干部本人、配偶及共同生活的子女住房情况表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserHouse extends BaseEntity<UserHouseVO> {

    private static final long serialVersionUID = 1L;
    public UserHouse(UserHouseVO vo){
        this.userHouseId = vo.getUserHouseId();
        this.userId = vo.getUserId();
        this.familyId = vo.getFamilyId();
        this.familyName = vo.getFamilyName();
        this.familyAppellation = vo.getFamilyAppellation();
        this.familyWorkUnit = vo.getFamilyWorkUnit();
        this.houseAdr = vo.getHouseAdr();
        this.houseFloorage = vo.getHouseFloorage();
        this.houseNature = vo.getHouseNature();
        this.houseSource = vo.getHouseSource();
        this.houseOwner = vo.getHouseOwner();
        this.buyHouse = vo.getBuyHouse();
        this.saleHouse = vo.getSaleHouse();
        this.rentHouse = vo.getRentHouse();
        this.buildHouse = vo.getBuildHouse();
        this.otherRemark = vo.getOtherRemark();
        this.remark = vo.getRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserHouseVO convertToVO(){
        return new UserHouseVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_house_id", type = IdType.ASSIGN_UUID)
    private String userHouseId;

    /**
     * 用户主表ID
     */
    private String userId;

    /**
     * 家庭成员ID
     */
    private String familyId;

    /**
     * 家庭成员姓名
     */
    private String familyName;

    /**
     * 家庭成员称谓，字典值
     */
    private String familyAppellation;

    /**
     * 家庭成员工作单位
     */
    private String familyWorkUnit;

    /**
     * 自住房屋地址
     */
    private String houseAdr;

    /**
     * 房屋建筑面积
     */
    private BigDecimal houseFloorage;

    /**
     * 房屋性质
     */
    private String houseNature;

    /**
     * 自住房屋来源
     */
    private String houseSource;

    /**
     * 产权人
     */
    private String houseOwner;

    /**
     * 购买房屋信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；nature，房屋性质，字符串；buyDate，购房时间，字符串；buyMoney，购房金额，小数）
     */
    private String buyHouse;

    /**
     * 出售房屋信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；nature，房屋性质，字符串；saleDate，售房时间，字符串；saleMoney，售房金额，小数）
     */
    private String saleHouse;

    /**
     * 出租房屋信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；nature，房屋性质，字符串；deadline，租赁期限，字符串；yearMoney，年租金，小数）
     */
    private String rentHouse;

    /**
     * 集资建房信息，json包含字段（adr，房屋地址，字符串；floorage，建筑面积，小数；buildUnit，集资单位，字符串；buildMoney，房款总额，小数；invest，个人支付，小数）
     */
    private String buildHouse;

    /**
     * 其他情况
     */
    private String otherRemark;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_house_id, user_id, family_id, family_name, family_appellation, family_work_unit, house_adr, house_floorage, house_nature, house_source, house_owner, buy_house, sale_house, rent_house, build_house, other_remark, remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status, 
    }
}
